//
//  MineModels.swift
//  LeGou
//
//  Created by lxm on 2022/7/23.
//

import Foundation
import HandyJSON
struct MineModels {
    struct Profit : HandyJSON {
        /// 本月成交预估收益
        var estimateMonthNowMoney = 0.0
        /// 今日成交预估收益
        var estimateTodayNowMoney = 0.0
        /// 余额
        var nowMoney = 0.0
        /// 累计收益
        var totalNowMoney = 0.0
        // 提现日期
        var withdrawalDate = ""
    }
    
    struct ProfitData : HandyJSON {
        var taskStatus = 0
        var incomeDataResponseList = [ProfitDataList]()
    }
    
    struct ProfitDataList : HandyJSON {
        /// 成交预估收益
        var estimateMoney = ""
        /// 付款笔数
        var quantity = 0
        /// 结算收益
        var settleMoney = ""
        /// 类型[1自购、2推荐、3共富、4合伙人、5消费奖池分红 6 红包 7 竞购]
        var type = 0
    
        // 0 1
        var taskStatus = 0
    }
    
    
    struct ServiceProviderInfo : HandyJSON {
        /// 差值：活跃度
        var differenceActivity = 0.0
        /// 差值：团队人数
        var differenceTeamNum = 0
        /// 晋升等级（1超级会员 2黑卡会员 3银卡会员 4金卡会员）
        var nextServiceProviderLevel = 0
        /// 晋升团队人数
        var nextTeamNum = 0
        /// 晋升活跃度
        var nextTotalActivity = 0.0
        /// 当前等级（1超级会员 2黑卡会员 3银卡会员 4金卡会员）
        var serviceProviderLevel = 0
        /// 进度条
        var speed = 0.0
        /// 当前团队人数
        var teamNum = 0
        /// 当前活跃度
        var totalActivity = 0.0
    }
    
    struct ACUserModel : HandyJSON {
        var avatar = ""
        var fansNum: Int = 0
        var inDirectNum: Int = 0
        var inviteNum: Int = 0
        var moneyProfit = 0.0
        var monthOrder: Int = 0
        var nickname = ""
        var phone = ""
        var realName = ""
        var serviceProviderLevel: Int = 0
        var showId = ""
        var todayProfit = 0.0
        var totalProfit = 0.0
        var treeId: Int = 0
        var uid: Int = 0
        var wechatCode = ""
        var wechatNo = ""
    }
    
    struct TeamAcModel : HandyJSON {
        var currentUser = ACUserModel()
        var nodes = [Node]()
    }
    
    struct Node : HandyJSON {
        var user : ACUserModel?
        var id = 0
    }
    
    
    struct ProfitList : HandyJSON {
        var image = ""
        var income = 0.0
        var orderCreateTime = ""
        var orderId = ""
        var orderTitle = ""
//        订单类型：1会员商城订单 2话费充值
        var orderType : ProfitOrderType = .vipMall
        var settleTime = ""
        var status : ProfitState = .payed
        // 是否合伙人收益订单：0否 1是 (粉丝订单)
        var type = 0
        // 类型 1,2 = 一般 3 = 共享（红包专用）
        var redType = 0
        // 红包专用
        var phone = ""
        // 红包专用
        var timeStr = ""
        // [推荐类型]：0直推 1间推"
        var spreadType = 0
    }
    
    enum ProfitOrderType : Int, HandyJSONEnum {
        
        case vipMall = 1
        case phoneCharge = 2
        // 悬赏任务
        case task = 3
        // 签到任务
        case signTask = 4
        
        case mt = 5
        
        case elem = 6
        
        case power = 7
        
        case tb = 8
        
        case auctionRecord = 100
        
        case auctionJoin = 101
        
        case auctionJoinTeam = 102
        
        case redBag = 14
    }

    class WalletInfo : HandyJSON {
        required init(){}
//        var aliAccount = ""
//        var aliName = ""
        var balance = 0.0
        var maxMoney = 0.0
        var minMoney = 0.0
        var wxAccount = ""
        var wxName = ""
        var cardNo = ""
        var cardType = ""
        var ownerName = ""
        var feeRatio = 0.0
        var bankName = ""
        var bankMobile = ""
        var bankNo = ""
        var alipayUserId = ""
        var alipayName = ""
        var withdrawalDate = ""
        var moneyToIntegral = 0.0
        var tips = ""
    }
    
    struct BillInfo : HandyJSON {
        var createTime = ""
        var balance: Int = 0
        var billType: Int = 0
        var category = ""
        var doneType = ""
        var id: Int = 0
        var linkId = ""
        var mark = ""
        var number = 0.0
        var pm: Int = 0
        var status: Int = 0
        var title = ""
        var type = ""
        var uid: Int = 0
        var updateTime = ""
    }
    
    
//    订单类型：1会员商城订单 2话费充值 3悬赏任务 4签到任务 5美团订单

    enum OrderType : Int, HandyJSONEnum {
        //订单类型：1会员商城订单 2话费充值 3悬赏任务 4签到任务 5美团订单 6饿了么 7电费充值
        case mall = 1
        
        case phone = 2

        case task = 3
        
        case sign = 4
        
        case mt = 5
        
        case elm = 6
        
        case power = 7
        
        case tb = 8
        
        case newBuy = 9
        
        case jd = 10
        
        case pdd = 15
    }
    
    //订单状态（0：已生成(已付款)、1已结算、2已失效）

    class OtherOrder : HandyJSON {
        required init(){}
        var image = ""
        var income = 0.0
        var orderCreateTime = ""
        var orderId = ""
        var orderTitle = ""
        var orderType : OrderType = .mall
        var settleTime = ""
        var status : ProfitState = .payed
        var type: Int = 0
    }
    
    class ActivityInfo : HandyJSON {
        required init(){}
        var totalActivity = 0.0
        var todayActivity = 0.0
        var teamActivity = 0.0
    }
}

